HeaderPropagation: reworded registration exception for clarity#12636
Merged
rynowak merged 2 commits intodotnet:masterfrom Jul 27, 2019
Merged
Conversation
analogrelay
reviewed
Jul 27, 2019
Contributor
analogrelay
left a comment
There was a problem hiding this comment.
Wordsmithing! Would like @rynowak to confirm all is in the right place (and my words are good), but otherwise LGTM
| $"initialized. Register the header propagation middleware by adding 'app.{nameof(HeaderPropagationApplicationBuilderExtensions.UseHeaderPropagation)}() " + | ||
| $"in the 'Configure(...)' method."; | ||
| $"initialized. Register the header propagation middleware by adding 'app.{nameof(HeaderPropagationApplicationBuilderExtensions.UseHeaderPropagation)}()' " + | ||
| $"in the 'Configure(...)' method. Also, do not use an HttpClient with header propagation outside of an incoming HTTP request."; |
Contributor
There was a problem hiding this comment.
Suggested change
| $"in the 'Configure(...)' method. Also, do not use an HttpClient with header propagation outside of an incoming HTTP request."; | |
| $"in the 'Configure(...)' method. Header propagation can only be used within the context of an HTTP request."; |
5c249ec to
ea8de36
Compare
analogrelay
approved these changes
Jul 27, 2019
Contributor
analogrelay
left a comment
There was a problem hiding this comment.
Looks good! I'll take a look at the CI failures. They may not be related.
Contributor
|
Yeah, looks like a timeout. Re-running. |
Contributor
Author
|
CI looks good now |
rynowak
approved these changes
Jul 27, 2019
Member
|
Thanks @alefranz |
alefranz
added a commit
to alefranz/HeaderPropagation
that referenced
this pull request
Oct 27, 2019
alefranz
added a commit
to alefranz/HeaderPropagation
that referenced
this pull request
Oct 27, 2019
alefranz
added a commit
to alefranz/HeaderPropagation
that referenced
this pull request
Oct 27, 2019
alefranz
added a commit
to alefranz/HeaderPropagation
that referenced
this pull request
Oct 27, 2019
c29m
added a commit
to c29m/HeaderPropagation
that referenced
this pull request
Mar 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MessageHandler throws when used outside of a request.
This reword the exception to clarify that this could be another possible cause of it.
Also fixes a missing
'in the current message.Related to #12169, but not a final fix
@rynowak I have a couple questions:
HttpContextAccessorto distinguish between the two types of errors and have a specific message, but this can add a performance hit if not already registered. Unless we use it only if it is available and fallback to this generic exception message otherwise. However adding a dependency only to have a better error message feels wrong./cc @anurse